package com.ning.ems.enums;

/**
 * @author Ning 242741154@qq.com
 * @date 2020/3/3 8:51
 */
@SuppressWarnings("unused")
public enum UserType {             // jurisdiction
    ADMIN(1, "管理员"),    // 增删员工
    COURIER(2, "快递员"),  // 订单处理
    CUSTOMER(3, "普通用户");   // 收发快递

    int id;
    String desc;

    UserType(int id, String desc) {
        this.id = id;
        this.desc = desc;
    }

    public static String descOf(int id) {
        for (UserType value : values()) {
            if (value.id == id) {
                return value.desc;
            }
        }
        System.out.println();
        return "";
    }
}
